<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<ul id="test">
			<li>1</li>
			<li>2</li>
			<li>3</li>
			<li>4</li>
			<li>5</li>
			<li>6</li>
			<li>7</li>
			<li>8</li>
			<li>9</li>
			<li>10</li>
		</ul>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script type="text/javascript">
			let i = 1
			let test = (function(a){
				$("#test").on('click',function(){
					a++
					console.log(a)
					console.log(i)
				})
			})
			test(i)
			console.log(i)
		</script>
	</body>
	<!--<script src="a.js"></script>-->

</html>